﻿using System;

namespace MiniAspNetCore
{
    /// <summary>
    /// 应用管道接口
    /// </summary>
    public interface IApplicationBuilder
    {
        /// <summary>
        /// 加入中间件到管道
        /// </summary>
        /// <param name="middleware"></param>
        /// <returns></returns>
        IApplicationBuilder Use(Func<RequestDelegate,RequestDelegate> middleware);

        /// <summary>
        /// 构建管道
        /// </summary>
        /// <returns></returns>
        RequestDelegate Build();
    }
}
